Skip to content

chore: standardize repository tooling#659

Open
afc163 wants to merge 28 commits into
masterfrom
codex/standardize-rc-config
Open

chore: standardize repository tooling#659
afc163 wants to merge 28 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.

Tracking issue: ant-design/ant-design#58514

Scope

  • Redesign README.md and README.zh-CN.md with centered title, Ant Design ecosystem branding, aligned badges, scoped Bundlephobia badge, install command, Usage, Development, Release, and License sections.
  • Standardize package metadata, GitHub repo metadata, npm package name, package entry fields, types: "./es/index.d.ts", publishConfig, and release flow through @rc-component/np.
  • Align shared dependencies and scripts for React, testing-library, Jest/Vitest where existing, TypeScript, ESLint, Prettier, Less, dumi, father, Husky, lint-staged, and Dependabot.
  • Use the shared react-component/rc-test/.github/workflows/test-utoo.yml@main workflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.
  • Keep Vercel preview configuration compatible with docs-dist output and remove legacy now-build / Cloudflare Pages residue.
  • Keep API docs, demos, tests, TypeScript checks, funding metadata, and npm package files aligned with the repository standardization matrix.

Notes

  • No breaking runtime behavior is intended.
  • React peer dependency ranges are preserved when narrowing them would be a breaking change.
  • secrets: inherit is kept until react-component/rc-test#176 is merged, then it can be narrowed to explicit CODECOV_TOKEN forwarding.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tree-select Canceled Canceled Jun 28, 2026 4:36am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 55 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 36b79164-6650-451d-84a9-b6c43e2c00da

📥 Commits

Reviewing files that changed from the base of the PR and between 9b43b63 and 35937dd.

📒 Files selected for processing (15)
  • .dumirc.ts
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • .husky/pre-commit
  • .prettierignore
  • LICENSE
  • README.md
  • README.zh-CN.md
  • package.json
  • tsconfig.json
  • vercel.json

Walkthrough

更新了 README 与资助入口,调整了 TypeScript/格式化脚本和编译范围,新增或修改了多个 GitHub Actions 工作流,并扩展了 Cloudflare、Surge 和 Vercel 的预览/部署配置。

Changes

仓库文档、工具链与自动化

Layer / File(s) Summary
README 头部与示例
.github/FUNDING.yml, README.md
README 的头部、Highlights、安装、用法和示例内容被重写,并新增 GitHub Sponsors 与 Open Collective 资助配置。
README API 与说明
README.md
README 的 TreeSelect、SearchConfig、DataNode、TreeNode、Notes、Development、Release 和 License 章节被重构。
脚本与 TypeScript 配置
package.json, tsconfig.json
prettier/tsc 脚本、TypeScript ESLint 依赖,以及顶层 include 编译范围被更新。
预览部署配置
.github/workflows/cloudflare-pages-preview.yml, .github/workflows/surge-preview.yml, vercel.json
新增 Cloudflare Pages 与 Surge 预览工作流,并扩展 Vercel 的安装、构建和输出目录配置。
CI 与代码扫描工作流
.github/workflows/codeql.yml, .github/workflows/react-doctor.yml, .github/workflows/react-component-ci.yml
CodeQL 触发与 action 版本被调整,新增 React Doctor 工作流,并切换 React 组件 CI 复用的测试工作流引用。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

我是一只小兔,蹦进春风里,
README 开花,脚本也排齐。
预览部署闪闪,检查像星粒,
啃一口胡萝卜,代码更整齐。
🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了此次以仓库工具链、文档和工作流标准化为主的改动。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.84%. Comparing base (08a9beb) to head (35937dd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #659   +/-   ##
=======================================
  Coverage   99.84%   99.84%           
=======================================
  Files          17       17           
  Lines         633      633           
  Branches      196      196           
=======================================
  Hits          632      632           
  Misses          1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request comprehensively updates the README.md with installation, usage, and API documentation. It also updates package.json by simplifying the Prettier script, adding a new tsc script for type-checking, adding TypeScript ESLint dependencies, and downgrading eslint-plugin-jest. Additionally, tsconfig.json is updated to include specific configuration files. The feedback suggests documenting the new tsc script in the README's development section.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread README.md
@afc163 afc163 force-pushed the codex/standardize-rc-config branch from a663729 to 0edc4f9 Compare June 26, 2026 03:36
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-tree-select-preview-pr-659.surge.sh (may be unavailable)
📝 Commit35937dd
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-tree-select-preview-pr-659.surge.sh
           size: 74 files, 2.1 MB

   Aborted - you do not have permission to publish to react-component-tree-select-preview-pr-659.surge.sh

🤖 Powered by surge-preview

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/cloudflare-pages-preview.yml:
- Around line 13-17: The Cloudflare deployment secrets are currently set at the
job level, so every step including npm install and build inherits them. Move
CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID out of the job-wide env in this
workflow and pass them only to the final Deploy preview step, while keeping
non-sensitive values like CLOUDFLARE_PAGES_PROJECT and PREVIEW where
appropriate. Update the affected workflow job and the Deploy preview step so the
secrets are only available at deployment time.

In @.github/workflows/react-component-ci.yml:
- Line 5: The reusable workflow reference in the CI workflow is using a mutable
branch, which should be pinned to an immutable commit SHA. Update the workflow
call in the rc-test reusable workflow reference to use a full commit hash
instead of the current branch reference, so the executed workflow content is
locked to a reviewed version.
- Around line 5-6: The workflow call is inheriting all repository secrets and
leaving the token scope too broad. Update the reusable workflow invocation in
react-component-ci to pass only the specific needed secrets instead of using
secrets: inherit, and add an explicit permissions block on the caller with the
minimum required GITHUB_TOKEN access. Use the existing workflow call to
react-component/rc-test/.github/workflows/test-utoo.yml as the place to tighten
both secrets and permissions.

In @.github/workflows/surge-preview.yml:
- Around line 20-30: The Surge preview step currently runs build commands
through afc163/surge-preview while injecting SURGE_TOKEN, which can expose the
token during build execution. Move the npm install and npm run build logic out
of the surge-preview action so it runs in a separate step before the action, and
then invoke afc163/surge-preview without a build block while keeping surge_token
only for the deployment step.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a018738f-d909-4902-89d3-9dc6e3b9e9e0

📥 Commits

Reviewing files that changed from the base of the PR and between 08a9beb and 9b43b63.

📒 Files selected for processing (10)
  • .github/FUNDING.yml
  • .github/workflows/cloudflare-pages-preview.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • README.md
  • package.json
  • tsconfig.json
  • vercel.json

Comment thread .github/workflows/cloudflare-pages-preview.yml Outdated
Comment thread .github/workflows/react-component-ci.yml
Comment thread .github/workflows/react-component-ci.yml
Comment thread .github/workflows/surge-preview.yml Outdated
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​cross-env@​10.1.010010010082100
Addednpm/​glob@​13.0.6961009985100
Addednpm/​@​testing-library/​react@​15.0.710010010087100
Addednpm/​lint-staged@​16.4.010010010097100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant